package com.pcg.posgasstation.model.network.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 'id' => 商品ID,
 * 'food_name' => 商品名称,
 * 'food_unit' => 商品单位,
 * 'food_price' => 商品单价,
 * 'food_amount' => 优惠额度,
 * 'food_type' => 商品类型ID,
 * 'type_name' => 商品类型名称,
 * 'stores_id' => 门店ID,
 * 'create_time' => 创建时间
 */
public class GoodsItemEntity implements Parcelable {

    private int id;
    private String food_name;
    private String food_unit;
    private String food_price;
    private String food_amount;
    private int food_type;
    private int operater_id;
    private int stores_id;
    private String remark;
    private int create_time;
    private String type_name;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getFood_name() {
        return food_name;
    }

    public void setFood_name(String food_name) {
        this.food_name = food_name;
    }

    public String getFood_unit() {
        return food_unit;
    }

    public void setFood_unit(String food_unit) {
        this.food_unit = food_unit;
    }

    public String getFood_price() {
        return food_price;
    }

    public void setFood_price(String food_price) {
        this.food_price = food_price;
    }

    public String getFood_amount() {
        return food_amount;
    }

    public void setFood_amount(String food_amount) {
        this.food_amount = food_amount;
    }

    public int getFood_type() {
        return food_type;
    }

    public void setFood_type(int food_type) {
        this.food_type = food_type;
    }

    public int getOperater_id() {
        return operater_id;
    }

    public void setOperater_id(int operater_id) {
        this.operater_id = operater_id;
    }

    public int getStores_id() {
        return stores_id;
    }

    public void setStores_id(int stores_id) {
        this.stores_id = stores_id;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public int getCreate_time() {
        return create_time;
    }

    public void setCreate_time(int create_time) {
        this.create_time = create_time;
    }

    public String getType_name() {
        return type_name;
    }

    public void setType_name(String type_name) {
        this.type_name = type_name;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeString(this.food_name);
        dest.writeString(this.food_unit);
        dest.writeString(this.food_price);
        dest.writeString(this.food_amount);
        dest.writeInt(this.food_type);
        dest.writeInt(this.operater_id);
        dest.writeInt(this.stores_id);
        dest.writeString(this.remark);
        dest.writeInt(this.create_time);
        dest.writeString(this.type_name);
    }

    public GoodsItemEntity() {
    }

    protected GoodsItemEntity(Parcel in) {
        this.id = in.readInt();
        this.food_name = in.readString();
        this.food_unit = in.readString();
        this.food_price = in.readString();
        this.food_amount = in.readString();
        this.food_type = in.readInt();
        this.operater_id = in.readInt();
        this.stores_id = in.readInt();
        this.remark = in.readString();
        this.create_time = in.readInt();
        this.type_name = in.readString();
    }

    public static final Parcelable.Creator<GoodsItemEntity> CREATOR = new Parcelable.Creator<GoodsItemEntity>() {
        @Override
        public GoodsItemEntity createFromParcel(Parcel source) {
            return new GoodsItemEntity(source);
        }

        @Override
        public GoodsItemEntity[] newArray(int size) {
            return new GoodsItemEntity[size];
        }
    };
}
